<template>
	<view class="list_con">
		<view class="guid" v-for="(val,index) in list" :key="index">
			<view class="status" :class="{errorStatus:val.status == 0}">{{val.status === 1 ? '生成成功' : '生成失败'}}</view>
			<view class="info_des">
				<view class="img"></view>
				<view class="right">
					<view class="up">
						<view class="lt">
							<view>{{val.name}} {{val.age}}岁 {{val.sex === 1 ? '男' : '女'}}</view>
							<view>开发医师：{{val.doctor}}</view>
						</view>
						<u-icon name="arrow-right" color="#999" size="28" @click="detail(val.status)"></u-icon>
					</view>
					<view class="date">上传时间：{{val.date}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				list:[
					{status:1,name:'张某某',age:33,sex:2,doctor:'王医师',date:'2025-08-12 20::55'},
					{status:0,name:'张某某',age:33,sex:2,doctor:'王医师',date:'2025-08-12 20::55'},
				]
			}
		},
		methods:{
			detail(type){
				if(type === 1){
					uni.navigateTo({
						url:"/pages/tabbar/home/medicine/successfulDetail"
					})
				}else{
					uni.navigateTo({
						url:"/pages/tabbar/home/medicine/errorDetail"
					})
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.list_con{
		width: 100%;
		height:100%;
		background: #F8F8F8;
		padding: 19rpx 30rpx;
		.guid{
			padding: 32rpx 38rpx;
			background: #FFFFFF;
			border-radius: 18rpx;
			margin-bottom: 14rpx;
			.status{
				font-weight: 400;
				font-size: 32rpx;
				color: #57BE09;
				margin-bottom: 10rpx;
			}
			.errorStatus{
				color:#7D2527;
			}
			.info_des{
				display: flex;
				align-items: center;
				.img{
					width:168rpx;
					height:169rpx;
					margin-right: 21rpx;
					border-radius: 10rpx;
					border:1rpx solid #ddd;
				}
				.right{
					flex: 1;
					.up{
						display: flex;
						align-items: center;
						justify-content: space-between;
						.lt{
							view{
								font-weight: 400;
								font-size: 32rpx;
								color: #000000;
								margin-bottom: 20rpx;
							}
						}
					}
					.date{
						font-weight: 400;
						font-size: 32rpx;
						color: #000000;
					}
				}
			}
		}
	}
</style>